#ifndef QPROJECTRESOURCE_H
#define QPROJECTRESOURCE_H

#include "sharedlibglobal.h"

#include <QObject>
#include <QMap>

namespace SHAREDLIB
{
    class QResourceFile;

    class SHAREDLIB_EXPORT QProjectResource : public QObject
    {
        Q_OBJECT
    public:
        explicit QProjectResource(QObject *parent = 0);
        ~QProjectResource();
        void    load(const QString &path);
        void    save(const QString &path);
        void    clear();

        void    addResource(const QString &name,const QByteArray &data);
        void    removeResource(const QString &name);

        static QProjectResource* resource();
        static void              release();
    signals:

    public slots:

    protected:
        QResourceFile   *m_file;
        static  QProjectResource*   m_resource;
        QMap<QString,int>           m_resourceNumber;

    };

}

#endif // QPROJECTRESOURCE_H
